Comments (5)
似乎新版已经实现了,issues可以关闭了
nice work!
from nowechatrevoke.
@ivytin 现在这个只是折中的办法,最好还是能在消息旁边添加,而且不用碰微信的数据库
from nowechatrevoke.
这样更完美
String talker = map.get(".sysmsg.revokemsg.session");
// get next msgId
Cursor cursor = (Cursor) callMethod(dbContext, "rawQuery",
"SELECT msgId FROM message WHERE rowid in (SELECT max(rowid) FROM message)", null);
cursor.moveToFirst();
int msgId = cursor.getInt(cursor.getColumnIndex("msgId")) + 1;
cursor.close();
// get talkerId
cursor = (Cursor) callMethod(dbContext, "rawQuery",
"SELECT *,rowid FROM rcontact WHERE username = '" + talker + "'", null);
cursor.moveToFirst();
int talkerId = cursor.getInt(cursor.getColumnIndex("rowid"));
cursor.close();
String msg = map.get(".sysmsg.revokemsg.replacemsg").replaceAll("撤回了", "尝试撤回");
int type = 10000;
int status = 3;
long createTime = System.currentTimeMillis();
long msgSvrId = createTime + (new Random().nextInt());
ContentValues v = new ContentValues();
v.put("msgid", msgId);
v.put("msgSvrid", msgSvrId);
v.put("type", type);
v.put("status", status);
v.put("createTime", createTime);
v.put("talker", talker);
v.put("content", msg);
v.put("talkerid", talkerId);
callMethod(dbContext, "insert", "message", "", v);
// for version 6.3.8
callMethod(callMethod(callStaticMethod(findClass("com.tencent.mm.model.ah",
lpparam.classLoader), "tl"), "rj"), "aTT");
// for version 6.3.9
callMethod(callMethod(callStaticMethod(findClass("com.tencent.mm.model.ah",
lpparam.classLoader), "tr"), "rk"), "aVP");
from nowechatrevoke.
@fkzhang 我看到你发布的版本了,代码也跟上面的类似,但这样的话高并发时msgId会不会有重复?
另外,将 createTime 改成被撤回消息的 createTime + 1 可以将系统提示显示在被撤回消息的下方。
from nowechatrevoke.
好主意
msgId 不会重复因为是从数据库得来的最大一个加一
最后一句就是告诉其他的这个msgId已经用过
from nowechatrevoke.
Related Issues (11)
- 请教一下,您是如何进行debug的? HOT 3
- 不同版本的微信跟撤回相关的className和functionName都不一样? HOT 1
- 同理会有noqqrevoke嚒 HOT 1
- 1.10版,微信6.3.8无效,QQ6.1无效 HOT 3
- 可否利用同样的原理开发抢红包插件 HOT 1
- 微信6.3.9防止撤回失效 HOT 5
- 消息栏提示*****已撤回!是否点击时能进入群里 HOT 1
- 今天更新了6.3.13 HOT 2
- 建议QQ标出撤回消息! HOT 2
- 如何使用能有个说明吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nowechatrevoke.